function play(filename)

% play(filename)
%
%       filename = valid dos filename of a .WAV file, without extension
%       
%       Plays a Windows .WAV file through the system speakers.  Prompts
%       for input as to whether the user wants the sound played again.
%

if (nargin ~= 1)
  error('PLAY: number of input arguments must be one.');
end;

if (nargout ~= 0)
  error('PLAY: number of output arguments must be zero.');
end;

eval(['!playw ' filename '.wav']);

while ~isempty(input('Enter 1 to play again, <RETURN> to continue... '))
  eval(['!playw ' filename '.wav']);
end

